<!DOCTYPE html>
<!-- saved from url=(0052)http://demo.htmleaf.com/1603/201603111505/index.html -->
<html lang="zh">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>列表</title>
	<link href="./ch2_11_table_files/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="./ch2_11_table_files/htmleaf-demo.css">
	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
		<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]-->
	<style>
		body {
				padding-top: 50px;
			}
			table {
				margin-top: 20px;
			}
			.starter-template {
				padding: 40px 15px;
				text-align: center;
			}
			table.table-fixed-head .table-fixed-head-thead {
				border-bottom: 1px solid #dddddd;
				background: #fff;
			}
	</style>
</head>
<body>

	<div class="container">
			<table class="table table-striped table-fixed-head" data-table-fixed-head-trigger="20" data-table-fixed-head-top="50">
				<thead>
					<tr class="success">
						<td>uname</td>
						<td>upass</td>
						<td>headimg</td>
					</tr>
				</thead>
				<tbody>
					<?php
					 $con = mysql_connect("localhost","root","root") or die("Could not connect !");
		             
					 $db = mysql_select_db("db_news",$con);
					 
					 
					 $result=mysql_query("SELECT uname,upass,headimg FROM tbl_user");
					 
					 $i=0;
					 while($row = mysql_fetch_array($result))
					 {

						
						$i++;
						
					  
					    echo " <tr>\n";
					    echo "					<td>".$row['uname'] ."</td>\n";
					    echo "					<td>".$row['upass'] ."</td>\n";
					    echo "					<td>".$row['headimg']."</td>\n";
					    echo "				</tr>\n";
					 

				}
				mysql_close($con);
				
				?>
				
				<tr>
					<td>Cell 1</td>
					<td>Cell 2</td>
					<td>Cell 3</td>
				</tr>
				
				</tbody>
			</table>

		</div>
	
	<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js" type="text/javascript"></script></body></html>